package org.mil.util;

import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class App {
	
	private static ResourceBundle systemProperties;
        //配置文件myConfig.properties放在classpath下面otherConfigs目录下面
	public static final String PROPERTIES_FILE_NAME = "config";
        //通过静态块加载 ResourceBundle 类
	static{
		
			
		
	}

	public static int div(int a,int b) {		
		return a/b;
	}
	
	public static String getPropertyByName(String name) {
		String str;
		
		try {
			systemProperties = ResourceBundle.getBundle(PROPERTIES_FILE_NAME+" ",Locale.ENGLISH);
			str= systemProperties.getString(name);
		} catch (MissingResourceException e) {
			str= "missing";
			
		}catch(Exception e){
			str= "missing2";
		}
		return str;
		
	}
	
	public static void main(String[] args){
		int a = 0;
		
		
		System.out.println(a);
		
	}
}


